home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / bcsrce2.zip / UTILMEN2.BC < prev    next >
Text File  |  1990-10-16  |  13KB  |  456 lines

  1. bios
  2. ECHO OFF
  3. break on
  4. rem saving starting drive/directory to return to as needed.
  5. GETDRIVE %!d
  6. GETDIR %!p
  7. rem This is not used in this menu. However, if it was:
  8. rem %!d:
  9. rem cd\%!p
  10. rem would be used each time upon changing drives & directories.
  11. Let %!z = L1
  12. :TOP2
  13. rem This is used only when menu has been overwrittened by some other
  14. rem program or full screen write.
  15. cls
  16. GOSUB MENU
  17. :TOP
  18. rem calling the MAKECOM.BAS created screen .COM file.
  19. GOSUB SCREEN
  20. rem ==============================
  21. rem display a clock on screen
  22. HOUR_HOUR
  23. ERROR_LEVEL %!h
  24. let %!w = %!h
  25. lt %!w 10
  26. if errorlevel 1 let %!h = 0%!h
  27. MINUTE_MINUTE
  28. ERROR_LEVEL %!m
  29. let %!w = %!m
  30. lt %!w 10
  31. if errorlevel 1 let %!m = 0%!m
  32. rem the below feature does not give an accurate reading. 'Tis best
  33. rem to not even use it unless attempting a timing algorythm.
  34. REM SECONDS_SECONDS
  35. REM ERROR_LEVEL %!s
  36. rem locate 2 20
  37. rem echonolf ▐ %!h:%!m:%!s ▌
  38. rem *litebar screen writes
  39. locate 2 21
  40. echonolf ▐ %!h:%!m ▌
  41. rem ==============================
  42. rem Get the key press then evaluate it.
  43. rem Note the sequence of using the same ERRLEVEL test two or three times
  44. rem with its associated action command. For two tests, it means HOME,
  45. rem END, or F1-F9 was pressed. For three tests, either an uppercase
  46. rem or lower case letter was pressed. The third test branches to the
  47. rem chosen menu choice's batch commands.
  48. getkey
  49. IF ERRLEVEL 20224 Let %!z = L9
  50. IF ERRLEVEL 20224 GOTO TOP
  51. IF ERRLEVEL 19712 GOTO RTL1
  52. IF ERRLEVEL 19200 GOTO LTL1
  53. IF ERRLEVEL 18176 Let %!z = L1
  54. IF ERRLEVEL 18176 GOTO TOP
  55. IF ERRLEVEL 17408 Let %!z = L1
  56. IF ERRLEVEL 17408 GOTO TOP
  57. IF ERRLEVEL 17152 Let %!z = L9
  58. IF ERRLEVEL 17152 GOTO TOP
  59. IF ERRLEVEL 16896 Let %!z = L8
  60. IF ERRLEVEL 16896 GOTO TOP
  61. IF ERRLEVEL 16640 Let %!z = L7
  62. IF ERRLEVEL 16640 GOTO TOP
  63. IF ERRLEVEL 16384 Let %!z = L6
  64. IF ERRLEVEL 16384 GOTO TOP
  65. IF ERRLEVEL 16128 Let %!z = L5
  66. IF ERRLEVEL 16128 GOTO TOP
  67. IF ERRLEVEL 15872 Let %!z = L4
  68. IF ERRLEVEL 15872 GOTO TOP
  69. IF ERRLEVEL 15616 Let %!z = L3
  70. IF ERRLEVEL 15616 GOTO TOP
  71. IF ERRLEVEL 15360 Let %!z = L2
  72. IF ERRLEVEL 15360 GOTO TOP
  73. IF ERRLEVEL 15104 Let %!z = L1
  74. IF ERRLEVEL 15104 GOTO TOP
  75. IF ERRLEVEL 119 Let %!z = L3
  76. IF ERRLEVEL 119 GOSUB SCREEN
  77. IF ERRLEVEL 119 GOTO L3
  78. IF ERRLEVEL 118 Let %!z = L6
  79. IF ERRLEVEL 118 GOSUB SCREEN
  80. IF ERRLEVEL 118 GOTO L6
  81. IF ERRLEVEL 117 Let %!z = L2
  82. IF ERRLEVEL 117 GOSUB SCREEN
  83. IF ERRLEVEL 117 GOTO L2
  84. IF ERRLEVEL 114 Let %!z = L9
  85. IF ERRLEVEL 114 GOSUB SCREEN
  86. IF ERRLEVEL 114 GOTO L9
  87. IF ERRLEVEL 105 Let %!z = L8
  88. IF ERRLEVEL 105 GOSUB SCREEN
  89. IF ERRLEVEL 105 GOTO L8
  90. IF ERRLEVEL 102 Let %!z = L7
  91. IF ERRLEVEL 102 GOSUB SCREEN
  92. IF ERRLEVEL 102 GOTO L7
  93. IF ERRLEVEL 100 Let %!z = L5
  94. IF ERRLEVEL 100 GOSUB SCREEN
  95. IF ERRLEVEL 100 GOTO L5
  96. IF ERRLEVEL 99 Let %!z = L4
  97. IF ERRLEVEL 99 GOSUB SCREEN
  98. IF ERRLEVEL 99 GOTO L4
  99. IF ERRLEVEL 97 Let %!z = L1
  100. IF ERRLEVEL 97 GOSUB SCREEN
  101. IF ERRLEVEL 97 GOTO L1
  102. IF ERRLEVEL 87 Let %!z = L3
  103. IF ERRLEVEL 87 GOSUB SCREEN
  104. IF ERRLEVEL 87 GOTO L3
  105. IF ERRLEVEL 86 Let %!z = L6
  106. IF ERRLEVEL 86 GOSUB SCREEN
  107. IF ERRLEVEL 86 GOTO L6
  108. IF ERRLEVEL 85 Let %!z = L2
  109. IF ERRLEVEL 85 GOSUB SCREEN
  110. IF ERRLEVEL 85 GOTO L2
  111. IF ERRLEVEL 82 Let %!z = L9
  112. IF ERRLEVEL 82 GOSUB SCREEN
  113. IF ERRLEVEL 82 GOTO L9
  114. IF ERRLEVEL 73 Let %!z = L8
  115. IF ERRLEVEL 73 GOSUB SCREEN
  116. IF ERRLEVEL 73 GOTO L8
  117. IF ERRLEVEL 70 Let %!z = L7
  118. IF ERRLEVEL 70 GOSUB SCREEN
  119. IF ERRLEVEL 70 GOTO L7
  120. IF ERRLEVEL 68 Let %!z = L5
  121. IF ERRLEVEL 68 GOSUB SCREEN
  122. IF ERRLEVEL 68 GOTO L5
  123. IF ERRLEVEL 67 Let %!z = L4
  124. IF ERRLEVEL 67 GOSUB SCREEN
  125. IF ERRLEVEL 67 GOTO L4
  126. IF ERRLEVEL 65 Let %!z = L1
  127. IF ERRLEVEL 65 GOSUB SCREEN
  128. IF ERRLEVEL 65 GOTO L1
  129. IF ERRLEVEL 27 GOTO END
  130. IF ERRLEVEL 13 GOTO SELECT
  131. GOTO TOP
  132. :SCREEN
  133. rem The structure of this section is:
  134. rem 1) Place cursor at each menu choice's title in turn.
  135. rem 2) If this is the one the user pointed to, hilite it.
  136. rem 3) Otherwise, overwrite it with no hilite.
  137. rem 4) Place cursor at position for a title's descriptive text line.
  138. rem 5) If its menu choice title is hilited, then show the descriptive
  139. rem    text. If not, do nothing.
  140. rem When recycling this code for a new program, this section takes
  141. rem the most rewriting.
  142. locate 4 2
  143. IF %!z = L1 ECHONOLF ▐ADDRBOOK▌
  144. IF NOT %!z = L1 ECHONOLF  ADDRBOOK\\32
  145. locate 6 3
  146. IF %!z = L1 ECHONOLF ADDRess BOOK of Street Talk names (for E-Mail & personal information)      ·
  147. locate 4 12
  148. IF %!z = L2 ECHONOLF ▐Users▌
  149. IF NOT %!z = L2 ECHONOLF  Users\\32
  150. locate 6 3
  151. IF %!z = L2 ECHONOLF Users currently logged onto the VINES network                              ·
  152. locate 4 19
  153. IF %!z = L3 ECHONOLF ▐WHOAMI▌
  154. IF NOT %!z = L3 ECHONOLF  WHOAMI\\32
  155. locate 6 3
  156. IF %!z = L3 ECHONOLF What is my Street Talk name/What server am I logged onto?                  ·
  157. locate 4 27
  158. IF %!z = L4 ECHONOLF ▐COPYD▌
  159. IF NOT %!z = L4 ECHONOLF  COPYD\\32
  160. locate 6 3
  161. IF %!z = L4 ECHONOLF Copy source filespec to target filespec with safeguard builtin             ·
  162. locate 4 34
  163. IF %!z = L5 ECHONOLF ▐DIR_List▌
  164. IF NOT %!z = L5 ECHONOLF  DIR_List\\32
  165. locate 6 3
  166. IF %!z = L5 ECHONOLF Input a Filespec to receive information on those files (ex: C:\123\*.WK?)  ·
  167. locate 4 44
  168. IF %!z = L6 ECHONOLF ▐ViewASCII▌
  169. IF NOT %!z = L6 ECHONOLF  ViewASCII\\32
  170. locate 6 3
  171. IF %!z = L6 ECHONOLF ASCII Chart of Extended IBM characters 128-thru-255 (can be printed)       ·
  172. locate 4 55
  173. IF %!z = L7 ECHONOLF ▐Format_A▌
  174. IF NOT %!z = L7 ECHONOLF  Format_A\\32
  175. locate 6 3
  176. IF %!z = L7 ECHONOLF Format either a 360K or 1.2MB diskette in drive A:                         ·
  177. locate 4 65
  178. IF %!z = L8 ECHONOLF ▐Ignor▌
  179. IF NOT %!z = L8 ECHONOLF  Ignor\\32
  180. locate 6 3
  181. IF %!z = L8 ECHONOLF Reserved for later expansion as needed                                     ·
  182. locate 4 72
  183. IF %!z = L9 ECHONOLF ▐RunDOS▌
  184. IF NOT %!z = L9 ECHONOLF  RunDOS\\32
  185. locate 6 3
  186. IF %!z = L9 ECHONOLF Run a single DOS command without exiting menu program                      ·
  187. RETURN
  188. :SELECT
  189. rem enter was pressed or one of the first letters of each choice
  190. rem This could be rewrittened as GOTO %!z, but it would be less
  191. rem readable.
  192. IF %!z = L1 GOTO L1
  193. IF %!z = L2 GOTO L2
  194. IF %!z = L3 GOTO L3
  195. IF %!z = L4 GOTO L4
  196. IF %!z = L5 GOTO L5
  197. IF %!z = L6 GOTO L6
  198. IF %!z = L7 GOTO L7
  199. IF %!z = L8 GOTO L8
  200. IF %!z = L9 GOTO L9
  201. GOTO TOP
  202. rem left cursor was pressed, positioning is determined
  203. :LTL1
  204. IF NOT %!z = L1 GOTO LTL2
  205. Let %!z = L9
  206. GOTO TOP
  207. :LTL2
  208. IF NOT %!z = L2 GOTO LTL3
  209. Let %!z = L1
  210. GOTO TOP
  211. :LTL3
  212. IF NOT %!z = L3 GOTO LTL4
  213. Let %!z = L2
  214. GOTO TOP
  215. :LTL4
  216. IF NOT %!z = L4 GOTO LTL5
  217. Let %!z = L3
  218. GOTO TOP
  219. :LTL5
  220. IF NOT %!z = L5 GOTO LTL6
  221. Let %!z = L4
  222. GOTO TOP
  223. :LTL6
  224. IF NOT %!z = L6 GOTO LTL7
  225. Let %!z = L5
  226. GOTO TOP
  227. :LTL7
  228. IF NOT %!z = L7 GOTO LTL8
  229. Let %!z = L6
  230. GOTO TOP
  231. :LTL8
  232. IF NOT %!z = L8 GOTO LTL9
  233. Let %!z = L7
  234. GOTO TOP
  235. :LTL9
  236. IF NOT %!z = L9 GOTO LTL1
  237. Let %!z = L8
  238. GOTO TOP
  239. rem right cursor was pressed, positioning is determined
  240. :RTL1
  241. IF NOT %!z = L1 GOTO RTL2
  242. Let %!z = L2
  243. GOTO TOP
  244. :RTL2
  245. IF NOT %!z = L2 GOTO RTL3
  246. Let %!z = L3
  247. GOTO TOP
  248. :RTL3
  249. IF NOT %!z = L3 GOTO RTL4
  250. Let %!z = L4
  251. GOTO TOP
  252. :RTL4
  253. IF NOT %!z = L4 GOTO RTL5
  254. Let %!z = L5
  255. GOTO TOP
  256. :RTL5
  257. IF NOT %!z = L5 GOTO RTL6
  258. Let %!z = L6
  259. GOTO TOP
  260. :RTL6
  261. IF NOT %!z = L6 GOTO RTL7
  262. Let %!z = L7
  263. GOTO TOP
  264. :RTL7
  265. IF NOT %!z = L7 GOTO RTL8
  266. Let %!z = L8
  267. GOTO TOP
  268. :RTL8
  269. IF NOT %!z = L8 GOTO RTL9
  270. Let %!z = L9
  271. GOTO TOP
  272. :RTL9
  273. IF NOT %!z = L9 GOTO RTL1
  274. Let %!z = L1
  275. GOTO TOP
  276. rem L1-L9 are the commands associated with each menu choice.
  277. rem Suggested continuations are L10-L##. You can choose where to
  278. rem restart the hilited choice from when taken back to the menu
  279. rem by changing the value of %!z variable.
  280. :L1
  281. addrbook
  282. Let %!z = L1
  283. goto TOP2
  284. :L2
  285. cls
  286. echo/
  287. echo/
  288. echo/
  289. users
  290. echo/
  291. echo/
  292. echo.
  293. gosub KLUDGWAT
  294. Let %!z = L2
  295. goto TOP2
  296. :L3
  297. CLS
  298. WHOAMI
  299. ECHO.
  300. ECHO.
  301. WHATZ
  302. echo.
  303. echo.
  304. echo.
  305. gosub KLUDGWAT
  306. Let %!z = L3
  307. goto TOP2
  308. :L4
  309. !COPYD
  310. Let %!z = L4
  311. goto TOP2
  312. :L5
  313. cls
  314. gosub BASICS
  315. rem fits within the info block of BASICS subroutines screen mask.
  316. locate 8 4
  317. echonolf  █  Waiting  █
  318. locate 9 4
  319. echonolf  █  for      █
  320. locate 10 4
  321. ec